package sm.namingservice;

import java.util.HashMap;
import java.util.Map;

public class ServerTable {
	private Map<String, ServerTuple> dwsTable;
	
	public ServerTable(){
		this.dwsTable = new HashMap<String,ServerTuple>();
	}
	
	public void addDws(String name,ServerTuple dws){
		this.dwsTable.put(name, dws);
	}
	public String getAddress(String name){
		ServerTuple dws = this.dwsTable.get(name);
//		return dws.getIp()+":"+dws.getPort();
		return dws.getIp();
	}
}
